#include"epollServer.hpp"
#include<memory>

// 使用手册
void Usage(std::string proc)
{
    std::cout << "\nUsage: " << proc << " serverip serverport\n" << std::endl;
}

void Server(std::string str)
{
    std::cout <<  str << std::endl;
}


int main(int argc, char* argv[])
{
    if(argc !=2)
    {
        Usage(argv[0]);
        exit(1);
    }

    uint16_t port = atoi(argv[1]);
    std::unique_ptr<epoll_1::TcpServer> server(new  epoll_1::TcpServer(Server,port));

    server->Start();
    
    return 0;
}